import api from './index'

// 用户登录
export const login = (data) => {
  return api.post('/user/login', data)
}

// 用户注册
export const register = (data) => {
  return api.post('/user/register', data)
}

// 获取用户信息
export const getUserInfo = () => {
  return api.get('/user/info')
}

// 更新用户信息
export const updateUserInfo = (data) => {
  return api.put('/user/info', data)
}

// 退出登录
export const logout = () => {
  return api.post('/user/logout')
}
